import {
  Login,
  Notfound,
  Goods,
  Users,
  Notice,
  Home,
  Userslist,
  Usersauthority,
  GoodsOrder,
  GoodsEdit,
  GoodsStat,
  Meeting,
  AbroadMeeting,
  InlandMeeting,
  MeetingStat
} from '../views'

import {
  DashboardOutlined,
  TeamOutlined,
  AlertOutlined,
  BankOutlined,
  BarsOutlined,
  UserOutlined,
  ProfileFilled,
  DatabaseFilled,
  AppstoreAddOutlined,
  StockOutlined
} from '@ant-design/icons'

// 不需要特定权限即可访问的路由
export const whiteListRoutes = [
  {
    path: '/login',
    component: Login
  },
   {
     path: '/home',
     component: Home
   },
  {
    path: '/404',
    component: Notfound
  }
]

// 需要权限才能访问的路由
export const adminRoutes = [
  {
    path: '/home',
    component: Home,
    meta: {
      title: '首页',
      icon: BankOutlined
    }
  },
  {
    path: '/admin/meeting',
    component: Meeting,
    meta: {
      title: '会议管理',
      icon: DashboardOutlined,
      exact: true
    },
    children: [{
        path: '/admin/abroadmeeting',
        component: AbroadMeeting,
        meta: {
          title: '国外会议',
          icon: ProfileFilled
        }
      },
      {
        path: '/admin/inlandmeeting',
        component: InlandMeeting,
        meta: {
          title: '国内会议',
          icon: ProfileFilled
        }
      },
      {
        path: '/admin/meetingstat',
        component: MeetingStat,
        meta: {
          title: '会议统计',
          icon: ProfileFilled
        }
      }
    ]
  },
  {
    path: '/admin/users',
    component: Users,
    meta: {
      exact: true,
      title: '用户管理',
      icon: TeamOutlined
    },
    children: [
      {
        path: '/admin/users/userslist',
        component: Userslist,
        meta: {
          title: '用户列表',
          icon:  BarsOutlined
        }
      },
      {
        path: '/admin/users/usersauthority',
        component: Usersauthority,
        meta: {
          title: '职务权限',
          icon: UserOutlined
        }
      }
    ]
  },
 {
   path: '/admin/goods',
   component: Goods,
   meta: {
     title: '物料管理',
     icon: DatabaseFilled,
     exact: true
   },
   children: [{
       path: '/admin/goods/goodsorder',
       component: GoodsOrder,
       meta: {
         title: '物料订单',
         icon: ProfileFilled
       }
     },
     {
       path: '/admin/goods/goodsedit',
       component: GoodsEdit,
       meta: {
         title: '物料审批',
         icon: AppstoreAddOutlined
       }
     },
     {
       path: '/admin/goods/goodsstat',
       component: GoodsStat,
       meta: {
         title: '物料统计',
         icon: StockOutlined
       }
     }
   ]
 },
  {
    path: '/admin/notice',
    component: Notice,
    meta: {
      title: '活动管理',
      icon: AlertOutlined
    }
  }
]

